Ext.define('TS.view.base.ProductClassifyEditer', {
    extend: 'Ext.window.Window',
    alias : 'widget.prodclassifyediter',

    title : '编辑商品类别',
    layout: 'fit',
    //autoShow: true,
	config: {
    	parentName:""//设置上级类别名称
    },
    initComponent: function() {
        this.items = [
            {
                xtype: 'form',
                items: [
                	{
                        xtype: 'hiddenfield',
                        name : 'parentId',
                        fieldLabel: '上级类别ID'
                    },
                    {
                        xtype: 'textfield',
                        name : 'parentName',
                        readOnly:true,
                        fieldLabel: '上级类别'
                    },
                    {
                        xtype: 'textfield',
                        name : 'classifyName',
                        fieldLabel: '类别名称',
                        allowBlank: false,
                        blankText : '类别名称不能为空'
                    }
                ]
            }
        ];

        this.buttons = [
            {
                text: '保存',
                action: 'save'
            },
            {
                text: '取消',
                scope: this,
                handler: this.close
            }
        ];

        this.callParent(arguments);
    },
    listeners: {
    	'show':function(){
    		this.down('form').items.items[1].setValue(this.getParentName());
    		this.down('form').items.items[2].focus(true,100);
    	}
    }
});